package com.common.demo.entity;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

/**
 * @Description UserUtil
 * @Author xiao  xun
 * @Date 2025-09-10
 */
@Data
public class UserUtil implements UserDetails {
    /**
     * 主键ID
     */
    private Long id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;
    private String path;
    private ArrayList<String> paths;
    /**
     * 权限：1-管理员，0-普通用户
     */
    private Integer role;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 状态：1-正常 2-禁用
     */
    private Integer status;

    /**
     * 注册时间
     */
    private Date registerTime;

    /**
     * 逻辑删除标记：0-未删除，1-已删除
     */
    private Integer isDeleted;

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public boolean isAccountNonExpired() {
        return false;
    }

    @Override
    public boolean isAccountNonLocked() {
        return false;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return false;
    }

    @Override
    public boolean isEnabled() {
        return false;
    }
}
